home *** CD-ROM | disk | FTP | other *** search
/ New Star Software Collection / NSS_Collection.iso / 3-170 dbase 10 for windows / 1.ima / SAMPLES.PAK / OPENWIND.PRG < prev    next >
Text File  |  1993-07-26  |  2KB  |  57 lines

  1. *******************************************************************************
  2. *  PROGRAM:      Openwind.prg
  3. *
  4. *  WRITTEN BY:   Borland Late Night Crew
  5. *
  6. *  DATE:         7/19/93
  7. *
  8. *  UPDATED:
  9. *
  10. *  VERSION:      Alpha α
  11. *
  12. *  DESCRIPTION:  Openwind shows how Bladerunner's window commands work together
  13. *                to open and close different kinds of windows.
  14. *                A window is OPENed, containing a listbox of European countries,
  15. *                and a pushbutton -- Info. Selecting Info or the listbox
  16. *                brings up another window with information about the selected
  17. *                country.  You can bring up as many of these windows as
  18. *                thre are available workareas. Pressing Cancel in any
  19. *                information window will close that window.
  20. *
  21. *  PARAMETERS:   None
  22. *
  23. *  CALLS:        None
  24. *
  25. *  USAGE:        DO Openwind
  26. *
  27. *
  28. *
  29. *******************************************************************************
  30. #define ALLTRIM(x) ltrim(rtrim(x))
  31. set talk off
  32. public windcnt
  33. windCnt = 0  && variable for count of information windows
  34. * since the program is event driven, you need to SET PROCEDURE to this file
  35. * so that at the end of the main program, when you are effectively located in
  36. * the command window, all the procedures will be available when a selection
  37. * is made.
  38. set procedure to sampproc
  39.  
  40. use country in select()
  41. select country
  42. define window Europe from 5,5 to 20,25 title "Country" of application;
  43.    sizeable;
  44.    onclose Clean_Openwindow()   && clean up when you leave the window
  45. define listbox country of Europe prompt field country->name from 2,3 to 10,18
  46. define pushbutton info of Europe prompt   " Info " at 13,6
  47. on selection window Europe do ShowInfo
  48. * OPEN WINDOW opens the window, but doesn't stop control flow.  So the next line
  49. * is executed after the window appears on the screen.
  50. open window Europe
  51. * Make the window Europe have focus
  52. set focus to Europe
  53. return
  54.  
  55. ******************************* End of OpenWind.prg ****************************
  56.  
  57.